<?php

namespace Database\Factories;

use App\Models\OtherOrder;
use Illuminate\Database\Eloquent\Factories\Factory;

class OtherOrderFactory extends Factory
{
    /**
     * The name of the factory's corresponding model.
     *
     * @var string
     */
    protected $model = OtherOrder::class;

    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition()
    {
        return [
            'user_id' => $this->faker->numberBetween(1, 1000),
            'order_id' => $this->faker->numberBetween(100000000, 999999999),
            'code' => $this->faker->numberBetween(1000000000, 9999999999),
            'type' => $this->faker->randomElement([
                'free',
                'memberCard',
                'superMemberCard'
            ]),
            'member_type' => $this->faker->randomElement([
                'month',
                'quarter',
                'year',
                'ever',
                'free'
            ]),
            'pay_type' => $this->faker->randomElement([
                'aliyun',
                'wechat'
            ]),
            'paid' => $this->faker->randomElement([0, 1]),
            'pay_price' => $this->faker->numberBetween(1, 999999),
            'trade_no' => $this->faker->numberBetween(10000000000, 9999999999),
            'channel_type' => $this->faker->randomElement([
                'app',
                'applet',
                'h5',
                'publicCode'
            ]),
            'member_price' => $this->faker->numberBetween(1, 99999),
            'pay_time' => $this->faker->time('Y-m-d H:i:s', 'now'),
            'is_free' => $this->faker->randomElement([0, 1]),
            'is_permanent' => $this->faker->randomElement([0, 1]),
            'overdue_time' => $this->faker->time('Y-m-d H:i:s', 'now'),
            'vip_day' => $this->faker->time('Y-m-d H:i:s', 'now')
        ];
    }
}
